<template>
	<view>
		<view class="button" @click="button()">点击连接</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.glassesUlr();
		},
		methods:{
			glassesUlr(){
				this.$http.glassesEst({
					url:"regist",
					
				})
				console.log(this.$http.glassesEst,"this.$http.glassesUlr");
			},
			button(){
				uni.openBluetoothAdapter({
					success() {
						uni.startBluetoothDevicesDiscovery()
						uni.onBluetoothDeviceFound(()=>{
							uni.getBluetoothDevices({
								success(res) {
									console.log(res,"res");
								},
								fail(err) {
									console.log(err,"err");
								}
							})
						})
					}
				})
			}
		}
	}
</script>

<style>
	.button{
		width: 300rpx;
		height: 300rpx;
		margin: 600rpx auto;
		background-color: aqua;
		line-height: 300rpx;
		text-align: center;
	}
</style>